<template>
  <div id="day001">
    <img alt="Vue logo" src="./assets/logo.png">
    <div>{{ count }}</div>
    <div>{{ doubleCount }}</div>
    <button @click="addCount">Click me!</button>
  </div>
</template>

<script>
import HelloWorld from './components/HelloWorld.vue'

export default {
  name: 'App',
  components: {
    HelloWorld
  },
  computed: {
    count() {
      return this.$store.state.home.count
    },
    doubleCount() {
      return this.$store.getters['home/doubleCount']
    }
  },
  methods: {
    addCount() {
      this.$store.dispatch('home/addCount', 1)
    }
  }
}
</script>

<style>
#day001 {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
